project(common)

file(GLOB_RECURSE HEAD_LIST ${CMAKE_CURRENT_SOURCE_DIR}/inc/*.h ${CMAKE_CURRENT_SOURCE_DIR}/inc/*.hpp)
message(STATUS "[${PROJECT_NAME}] HEAD_LIST: ${HEAD_LIST}")
file(GLOB_RECURSE SRC_LIST ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
message(STATUS "[${PROJECT_NAME}] SRC_LIST: ${SRC_LIST}")

add_library_with_export(${PROJECT_NAME} SHARED ${HEAD_LIST} ${SRC_LIST})

target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION}::Core Qt${QT_VERSION}::Widgets)

target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc)

include(OutputDirConfig)


set_target_properties(${PROJECT_NAME} PROPERTIES 
            OUTPUT_NAME "${PROJECT_NAME}"
            PREFIX ""
            DEBUG_POSTFIX ""
            DEFINE_SYMBOL "${PROJECT_NAME}_EXPORTS")